<template>
  <div class="pop">
    <el-popconfirm
      :title="config.title"
      :offset="config.offset"
      :icon="config.icon"
      :icon-color="config.iconColor"
      placement="top"
      :confirm-button-text="config.confirmButtonText"
      :cancel-button-text="config.cancelButtonText"
      @confirm="config.confirm()"
    >
      <template #reference>
        <slot>
          <el-button type="danger">Delete</el-button>
        </slot>
      </template>
    </el-popconfirm>
  </div>
</template>

<script lang="ts" setup>
import { popConfirmConfig as config } from "../config/config";
import { ref } from "vue";

const visible = ref(true);
</script>

<style lang="less"></style>
